﻿using System;
using System.Collections.Generic;

using SBPweb.Forge.Contracts.Components;

using SBPweb.Communication.Shared.Library.Contacts;

namespace SBPweb.Communication.Shared.Library.Profiles
{

    public abstract class ProfileManagerBase : InitializableBase, IProfileManager
    {

        #region Protected fields

        protected MessengerBase messenger;

        #endregion

        #region Constructor logic

        protected ProfileManagerBase(MessengerBase messenger)
        {
            this.messenger = messenger;
        }

        #endregion

        #region Property accessors

        protected IMessenger Messenger
        {
            get
            {
                return messenger;
            }
        }

        public IProfileManagerConfiguration Configuration
        {
            get;
            protected set;
        }

        #endregion

        #region Events

        #endregion

        #region Methods

        public void ApplyConfiguration(IProfileManagerConfiguration configuration)
        {
            Configuration = configuration;
        }

        #region IProfileManager Members

        public abstract void RequestProfile(IContact contact, EventHandler<ProfileBaseEventArgs> responseHandler);

        #endregion

        #endregion

    }

}